<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
    version="1.0"
    xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 
    xmlns:xf="http://www.w3.org/2002/xforms" 
    xmlns:ev="http://www.w3.org/2001/xml-events" 
    xmlns:xhtml="http://www.w3.org/1999/xhtml"
    xmlns="http://www.w3.org/1999/xhtml" 
    xmlns:atom="http://www.w3.org/2005/Atom"
    xmlns:app="http://purl.org/atom/app#" 
    xmlns:ui="urn:uuid:user-interface-patterns#">
    <xsl:template match="/">
        <html xmlns:xf="http://www.w3.org/2002/xforms" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://www.w3.org/1999/xhtml" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events">    
            <head profile="http://www.w3.org/2003/g/data-view">        
                <link rel="transformation" href="http://www-sop.inria.fr/acacia/soft/RDFa2RDFXML.xsl" />
                <title>Atom Service Workspace(s)</title>
                <link href="atom.css" rel="stylesheet"/>       
            </head>
            <body>
                <h1>Atom Service Workspace(s)</h1>                
                <xsl:apply-templates select="app:service"/>
            </body>
        </html>
    </xsl:template>
    <xsl:template match="app:collection">
        <li about="{@href}"
            property="rdfs:label" 
            content="{atom:title}">
            <a property="awol:title"  
               href="/atom-browse/?uri={@href}&amp;type=collection"><xsl:value-of select="atom:title"/></a>
        </li>                
    </xsl:template>
    <xsl:template match="app:service/app:workspace">
        <fieldset>
            <legend about="{atom:title}"
                    property="rdfs:label"><xsl:value-of select="atom:title"/></legend>
            <xsl:if test="app:collection">
                <ul>
                    <xsl:apply-templates select="app:collection"/>
                </ul>
            </xsl:if>            
        </fieldset>   
    </xsl:template>
    <xsl:template match="@*|node()">
        <xsl:copy>
            <xsl:apply-templates select="@*|node()"/>
        </xsl:copy>
    </xsl:template>
</xsl:stylesheet>